package com.buer.train.common.holder;


/**
 *
 * @ProjectName:
 * @Package:        com.buer.train.common.holder
 * @ClassName:      LoginUserHolder
 * @Description:    java类作用描述
 * @Author:         lds
 * @CreateDate:     2021/1/14 17:25
 * @UpdateUser:     更新者
 * @UpdateDate:     2021/1/14 17:25
 * @UpdateRemark:   更新内容
 * @Version:        1.0
 */
public class LoginUserHolder {
    private static final ThreadLocal<LoginUser> loginUserHolder = new ThreadLocal<>();


    public static void setLoginUserHolder(LoginUser loginUser) {
        loginUserHolder.set(loginUser);
    }


    public static LoginUser getLoginUserHolder() {
        return loginUserHolder.get();
    }


    public static void clearLoginUserHolder() {
        loginUserHolder.remove();
    }

}
